package com.hutianao.gqgl.information.cementProduction.control;

import com.hutianao.gqgl.information.cementProduction.entity.SearchCementProductionEntity;
import com.hutianao.gqgl.information.cementProduction.service.CementProductionService;
import com.hutianao.gqgl.information.cementProduction.service.CementProductionService;
import com.hutianao.gqgl.mybatis.entity.CementProductionEntity;
import com.hutianao.gqgl.mybatis.flexigrid.PaddingEntity;
import com.hutianao.gqgl.mybatis.flexigrid.PadingRstType;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
@RequestMapping("/information/cementProduction")
public class cementProductionController {
    private Logger logger = LogManager.getLogger(this.getClass());
    @Resource
    private CementProductionService cementProductionService;

    @RequestMapping("/informationPage")
    public String informationPage(){
        return "information/cementProduction/informationPage";
    }

    @RequestMapping("/queryCementProductionInfoListByPage")
    @ResponseBody
    public PadingRstType<CementProductionEntity> queryCementProductionInfoListByPage(SearchCementProductionEntity search, PaddingEntity padding){
        logger.info(search);
        logger.info(padding);
        PadingRstType<CementProductionEntity> padingRstType = cementProductionService.queryCementProductionInfoListByPage(search,padding);

        return padingRstType;
    }

}
